<!--
 * @Author: wanglidong
 * @Date: 2022-07-07 15:30:16
 * @LastEditors: wanglidong
 * @LastEditTime: 2022-07-07 15:32:41
 * @Description:
 * @FilePath: \lowcode-front\src\views\governmentHonest\party-clean-index\index.vue
-->
<template>
  <div class="party-clean-index">
    <div class="flex-hv-center">
      <img style="width: 284px;" alt="#" :src="imgUrl" />
      <span style="margin-top: 60px;text-decoration: underline;cursor: pointer" @click="goLeadPage">打开驾驶舱</span>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      imgUrl: require('@/assets/images/cockpit/party-clean.png'),
    }
  },
  computed: {
    projectId() {
      return this.$store.state.settings.changeHeaderProject
    },
  },
  created () {
    window.open(window.location.origin+'#'+'/cockpit/home')

    // let projectsArr = sessionStorage.getItem('projectsArr')
    // if(projectsArr.indexOf('不限')>-1){
    //   //当左上角出现【不限项目】，说明他是集团或项管公司的人，他可以看到系统内所有项目。那就是跳多项目驾驶舱
    //   window.open(window.location.origin+'#'+'/cockpit-wrap')
    // }else {
    //   //如果左上角，不出现【不限项目】，那他就是项目公司的人，可能他有多个项目，这时就要根据他左上角选择的项目跳对应的项目级驾驶舱
    //   let projectList = JSON.parse(projectsArr)
    //   projectList.forEach((item,index)=>{
    //     if(item.id == this.projectId){
    //       let projectId = item.id
    //       let projectName  =  item.name
    //       this.$router.push({ name: 'bigScreenProjectView', query: { projectId, projectName } })
    //     }
    //   })
    // }
  },
  methods:{
    goLeadPage(){
      window.open(window.location.origin+'#'+'/cockpit/home')
    },
  },
}
</script>

<style lang="scss" scoped>
  .party-clean-index{
    height: 60vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .flex-hv-center{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
</style>
